<?php
/**
 * Created by PhpStorm.
 * User: zjx
 * Date: 2016/10/31
 * Time: 9:59
 */

namespace App\Exceptions;

class WeChatRequestException extends WeChatException
{
    public function response()
    {
        $res_arr = [
            'code' => $this->code,
            'error' => $this->error,
        ];

        if ( $this->debug || $this->code === -1 ) {
            $res_arr['trace'] = $this->getTrace();
        };

        return response($res_arr , 200);
    }
}